import request from '@/utils/request'
import { requestModel } from '@/types/service'

// 获取card列表
export const listCard: requestModel = () => request({
    url: '/card/list',
    method: 'get',
})

// 获取card详情
export const getCard: requestModel = (cardId) => request({
    url: '/card?cardId=' + cardId,
    method: 'get',
})

// 删除card
export const delCard: requestModel = (cardId) => request({
    url: '/card?cardId=' + cardId,
    method: 'delete'
})

// 新增card
export const addCard: requestModel = (data) => request({
  url: '/card',
  method: 'post',
  data
})

// 更新card
export const updateCard: requestModel = (data) => request({
  url: '/card',
  method: 'put',
  data
})